import json
import xml.etree.ElementTree
from os.path import join

import sumolib
import traci

import rou
import scene
import rou.constants as rc
from rou._route_detail import RouteDetail
import sumo_utils
import random
import uuid


class RoutConfig:

    def __new__(cls, *args, **kwargs):
        return super().__new__(cls)

    def __init__(self, taskId, rouId: str, userId: str,name:str,rouUrl:str,route:str,sceneInfo:object ,type:int,source:int):
        self.taskId = taskId
        self.rouId = rouId
        self.userId = userId
        self.rouUrl = rouUrl
        self.name = name
        self.type = type
        self.route = route
        self.scene_info = sceneInfo
        self.source = source



    def to_dict(self):
        return {
            'taskId': self.taskId,
            'rouId': self.rouId,
            'userId': self.userId,
            'rouUrl': self.rouUrl,
            'name': self.name,
            'type': self.type,
            'route': self.route,
            'sceneInfo': self.scene_info,
            'source': self.source
        }
